package com.dao;

import com.dto.in.UserDto;
import com.entity.LoginInfo;
import com.entity.User;
import org.apache.ibatis.annotations.Param;

/**
 * Created by Administrator on 2018/10/20 0020.
 */
public interface LoginDao {

    LoginInfo findPhone(@Param("phone")String phone,@Param("password")String password,@Param("typeName")String typeName);

    int findTeacherIsBeing(@Param("userId")Integer userId);

    int insertCertification(@Param("userId")Integer userId);

    int findIsCard(@Param("userId")Integer userId);

    int findPhoneIsBeing(@Param("phone") String phone);

    int insertUser(User user);

    int addFreeMoney(@Param("id")Integer id);

    int insertUserP(@Param("id")Integer id,@Param("pid")Integer pid);

    String getOpenId(@Param("userId")Integer userId);

    int addTeacher(@Param("userId")Integer userId);

    int updatePassword(@Param("phone")String phone,@Param("password")String password);

    int findPasswordIsCorrect(@Param("userId")Integer userId,@Param("password")String password);

    int updatePasswords(@Param("userId")Integer userId,@Param("password")String password);

    int setPhone(@Param("phone")String phone,@Param("newPhone")String newPhone);

    int findLoginLcationCount(@Param("userId")Integer userId,@Param("address")String address);

    int insertLoginLocation(@Param("userId")Integer userId,@Param("latitude")String latitude,@Param("longitude")String longitude,@Param("address")String address);

    int findTimedTask();

}
